
<link href="<?php echo base_url();?>data/css/demo_table.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?php echo base_url();?>data/js/jquery.dataTables.js"></script>
<script type="text/javascript" charset="utf-8">
	$(document).ready(function() {
		$('.adminTable').dataTable( {
			"sPaginationType": "full_numbers"
		} );
	} );
</script>

<style type="text/css">

.adminTable {
    border-collapse: collapse;
    font-size: 12px;
    -moz-box-shadow:0 0 15px #999;
    -webkit-box-shadow:0 0 15px #999;
}

.adminTable thead {
    display: table-header-group;
    border: 1px solid black;
    vertical-align: middle;
    font-size: 12px;
    cursor: pointer;
    background: orange;
    color: white;
    text-align: center;
}

.adminTable thead th {
    border: 1px solid black;
}

.adminTable tfoot, .adminTable tbody, .adminTable td {
	background: #EEEEEE;
    border: 1px solid black;
}

</style>

    <title>Halaman Administrasi</title>
</head>

<body onload="getTime();">

<div id="container">
  <div id="header">
    <div id="logoHeader"></div>
    <div id="accountName">
    	<div id="accountInfo">
    	  <p><b><span id="date"></span>&nbsp;<span id="clock"></span></b></p>
          <br />
          <p><i>Selamat Datang, <?php echo $nama_akun; ?></i></p>
        </div>
    </div>
  <br class="clearfloat"/>
  </div>
  <!-- end #header -->
  <div id="naviLink">
    <ul id="navUL">
    	<li><a href="<?php echo site_url('main/beranda');?>">Beranda</a></li>
    	<li><a href="<?php echo site_url('main/admin');?>">Admin</a></li>
    	<li><a href="<?php echo site_url('main/penjualan');?>">Penjualan</a></li>
    	<li><a href="<?php echo site_url('main/inventaris');?>">Inventaris</a></li>
        <li><a href="<?php echo site_url('main/pembelian');?>">Pembelian</a></li>
    	<li><a href="<?php echo site_url('main/log');?>">Log</a></li>
    </ul>
    <div id="divLogOut"><a href="<?php echo site_url('main/log_out');?>">Log Out</a></div>
  </div>
    
<?php
	// show user messages sent by controller
	echo output_msg($type = null);
?>

  <div id="mainContent">
  
  	<div id="contentInfo">
    	<div id="adminInfo">
        	<a href="#">Admin</a>&nbsp;&nbsp;&nbsp;&#8250;&nbsp;&nbsp;&nbsp;<a>Home</a>
        </div>
        <div id="adminTambah">
        	&#8226;&nbsp;&nbsp;<a href="<?php echo site_url('main/tambah');?>">Tambah</a>
        </div>
        <br class="clearfloat" />
    </div>
    
  	<br/>
    
  <table class="adminTable">
        <thead>
          <tr>
            <th>Akun</th>
            <th>Nama Lengkap</th>
            <th>No. Kontak</th>
            <th>Tipe</th>
            <th>Pilihan</th>
          </tr>
        </thead>
        
        <tbody>
          <?php foreach($accounts as $account):?>
          <tr>
            <td><?php echo $account->acc_name;?></td>
            <td><?php echo $account->user_name;?></td>
            <td><?php echo $account->contact;?></td>
            <td><?php echo $account->type;?></td>
            <td align="center">
                <a href="<?php echo site_url('main/ubah/'.$account->acc_id);?>">
                    <img src="<?php echo base_url();?>data/img/pencil.png" title="Ubah User" />
                </a>
                <a href="<?php echo site_url('main/hapus/'.$account->acc_id);?>">
                    <img src="<?php echo base_url();?>data/img/cross.png" title="Hapus User" />
                </a>
            </td>
          </tr>
          <?php endforeach;?>
        </tbody>
      </table>
    <!-- end #mainContent -->
    <br class="clearfloat" />
  </div>